package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.WorkerCertficationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("WorkerCertificationAudit")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 提交认证")
public class CertificationAuditController {
    @Resource
    private WorkerCertficationAuditService workerCertficationAuditService;

    @PostMapping
    @ApiOperation("服务端提交认证申请")
    public void certificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO dto) {
        workerCertficationAuditService.certificationAudit(dto);
    }

    @GetMapping(path = "/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public String rejectReason() {
        return workerCertficationAuditService.rejectReason();
    }
}
